<!DOCTYPE html>
<html lang="zh-Hans">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智农云枢系统</title>
    <link rel="icon" href="greenlog.png" sizes="16x16">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;700&display=swap" rel="stylesheet">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/js/all.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', sans-serif;
            margin: 0;
            padding: 0;
            background: linear-gradient(135deg, #4CAF50, #2196F3);
            color: #333;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
            position: relative;
            min-height: 100vh;
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background-color: rgba(255, 255, 255, 0.9);
            padding: 15px 30px;
            border-radius: 15px;
            margin-bottom: 30px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .logo-container {
            display: flex;
            align-items: center;
        }

        .logo-container img {
            width: 60px;
            height: 60px;
            margin-right: 15px;
        }

        h1 {
            font-size: 28px;
            color: #4CAF50;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }

        nav ul {
            display: flex;
            list-style-type: none;
            padding: 0;
        }

        nav ul li {
            margin-left: 30px;
        }

        nav ul li a {
            text-decoration: none;
            color: #333;
            font-weight: bold;
            font-size: 18px;
            transition: color 0.3s ease;
        }

        nav ul li a:hover {
            color: #4CAF50;
        }

        nav ul li a.active {
            color: #4CAF50;
            border-bottom: 2px solid #4CAF50;
        }

        main {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
            margin-bottom: 60px;
        }

        .card {
            background-color: rgba(255, 255, 255, 0.9);
            border-radius: 15px;
            padding: 25px;
            text-align: center;
            box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }

        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
        }

        .card-icon {
            font-size: 48px;
            margin-bottom: 15px;
            color: #4CAF50;
        }

        .card h2 {
            font-size: 22px;
            margin-bottom: 15px;
        }

        .data-display {
            background-color: #f0f0f0;
            border-radius: 10px;
            padding: 10px;
            font-size: 24px;
            font-weight: bold;
            color: #333;
            margin-top: 15px;
        }

        .control-switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 34px;
        }

        .control-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 26px;
            width: 26px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked+.slider {
            background-color: #4CAF50;
        }

        input:checked+.slider:before {
            transform: translateX(26px);
        }

        .refresh-button {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 70px;
            height: 70px;
            border-radius: 50%;
            background-color: #4CAF50;
            color: white;
            border: none;
            font-size: 28px;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }

        .refresh-button:hover {
            background-color: #45a049;
            transform: scale(1.05);
        }

        .refresh-button:active {
            transform: scale(0.95) rotate(360deg);
        }

        footer {
            text-align: center;
            padding: 25px 0;
            color: white;
            background: linear-gradient(135deg, rgba(76, 175, 80, 0.9), rgba(33, 150, 243, 0.9));
            border-top-left-radius: 15px;
            border-top-right-radius: 15px;
        }

        footer p {
            margin: 0;
            font-size: 20px;
            font-weight: 300;
            letter-spacing: 1px;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
        }

        @keyframes pulse {
            0% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.1);
            }

            100% {
                transform: scale(1);
            }
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .animate-pulse {
            animation: pulse 2s infinite;
        }

        .animate-spin {
            animation: spin 4s linear infinite;
        }

        .control-row {
            display: flex;
            justify-content: space-around;
            margin-bottom: 30px;
        }

        .control-card {
            flex: 1;
            margin: 0 15px;
        }

        .animated-icons {
            position: fixed;
            top: 50%;
            transform: translateY(-50%);
        }

        .animated-icons.left {
            left: 20px;
        }

        .animated-icons.right {
            right: 20px;
        }

        .icon-wrapper {
            margin: 20px 0;
            color: white;
        }

        #current-time {
            position: fixed;
            top: 20px;
            right: 20px;
            background-color: rgba(255, 255, 255, 0.8);
            padding: 10px;
            border-radius: 5px;
            font-size: 18px;
            font-weight: bold;
        }

        .content-wrapper {
            padding-bottom: 100px;
        }
    </style>
</head>

<body>
    <div id="current-time"></div>

    <div class="animated-icons left">
        <div class="icon-wrapper">
            <i class="fas fa-leaf fa-2x"></i>
        </div>
        <div class="icon-wrapper">
            <i class="fas fa-seedling fa-2x"></i>
        </div>
        <div class="icon-wrapper">
            <i class="fas fa-tree fa-2x"></i>
        </div>
    </div>

    <div class="container">
        <div class="content-wrapper">
            <header>
                <div class="logo-container">
                    <img src="greenlog.png" alt="智农云枢系统 Logo">
                    <h1>智农云枢系统</h1>
                </div>
                <nav>
                    <ul>
                        <li><a href="#" class="active">控制中心</a></li>
                        <li><a href="video.html">监控中心</a></li>
                        <li><a href="about.html">开发团队</a></li>
                    </ul>
                </nav>
            </header>

            <main>
                <!-- Environmental Data Cards -->
                <div class="card">
                    <i class="fas fa-temperature-high card-icon animate-pulse"></i>
                    <h2>环境温度</h2>
                    <div class="data-display">-- °C</div>
                </div>

                <div class="card">
                    <i class="fas fa-tint card-icon animate-pulse"></i>
                    <h2>环境湿度</h2>
                    <div class="data-display">-- %</div>
                </div>

                <div class="card">
                    <i class="fas fa-sun card-icon animate-pulse"></i>
                    <h2>光照强度</h2>
                    <div class="data-display">-- lux</div>
                </div>

                <div class="card">
                    <i class="fas fa-thermometer-half card-icon animate-pulse"></i>
                    <h2>棚内温度</h2>
                    <div class="data-display">-- °C</div>
                </div>

                <div class="card">
                    <i class="fas fa-water card-icon animate-pulse"></i>
                    <h2>棚内湿度</h2>
                    <div class="data-display">-- %</div>
                </div>

                <div class="card">
                    <i class="fas fa-smog card-icon animate-pulse"></i>
                    <h2>二氧化碳含量</h2>
                    <div class="data-display">-- ppm</div>
                </div>

                <div class="card">
                    <i class="fas fa-wind card-icon animate-pulse"></i>
                    <h2>氧气含量</h2>
                    <div class="data-display">-- %</div>
                </div>

                <div class="card">
                    <i class="fas fa-seedling card-icon animate-pulse"></i>
                    <h2>土壤湿度</h2>
                    <div class="data-display">-- %</div>
                </div>
            </main>

            <!-- Control Cards -->
            <div class="control-row">
                <div class="card control-card">
                    <i class="fas fa-fan card-icon animate-spin"></i>
                    <h2>冷风机</h2>
                    <label class="control-switch">
                        <input type="checkbox" id="chu">
                        <span class="slider"></span>
                    </label>
                </div>

                <div class="card control-card">
                    <i class="fas fa-tint card-icon animate-spin"></i>
                    <h2>抽水泵</h2>
                    <label class="control-switch">
                        <input type="checkbox" id="pup">
                        <span class="slider"></span>
                    </label>
                </div>

                <div class="card control-card">
                    <i class="fas fa-fire card-icon animate-spin"></i>
                    <h2>暖风机</h2>
                    <label class="control-switch">
                        <input type="checkbox" id="wet">
                        <span class="slider"></span>
                    </label>
                </div>
            </div>

            <div class="control-row">
                <div class="card control-card">
                    <i class="fas fa-lightbulb card-icon animate-spin"></i>
                    <h2>照明灯</h2>
                    <label class="control-switch">
                        <input type="checkbox" id="lig">
                        <span class="slider"></span>
                    </label>
                </div>

                <div class="card control-card">
                    <i class="fas fa-bell card-icon animate-spin"></i>
                    <h2>报警器</h2>
                    <label class="control-switch">
                        <input type="checkbox" id="buz">
                        <span class="slider"></span>
                    </label>
                </div>
            </div>
        </div>

        <button class="refresh-button" onclick="refreshinfo()">
            <i class="fas fa-sync-alt"></i>
        </button>

        <footer>
            <p>&copy; 2024 智农云枢系统 - 绿水青山，智慧农业</p>
        </footer>
    </div>

    <div class="animated-icons right">
        <div class="icon-wrapper">
            <i class="fas fa-cloud-sun fa-2x"></i>
        </div>
        <div class="icon-wrapper">
            <i class="fas fa-water fa-2x"></i>
        </div>
        <div class="icon-wrapper">
            <i class="fas fa-mountain fa-2x"></i>
        </div>
    </div>

    <script src="js/main.js"></script>
    <script>
        function updateCurrentTime() {
            const now = new Date();
            const timeString = now.toLocaleTimeString('zh-CN', { hour12: false });
            document.getElementById('current-time').textContent = timeString;
        }

        setInterval(updateCurrentTime, 1000);
        updateCurrentTime();
    </script>
</body>

</html>